Integrand size = 15, antiderivative size = 59 \[ \int \frac {\cosh ^4(x)}{a+b \cosh ^2(x)} \, dx=-\frac {(2 a-b) x}{2 b^2}+\frac {a^{3/2} \text {arctanh}\left (\frac {\sqrt {a} \tanh (x)}{\sqrt {a+b}}\right )}{b^2 \sqrt {a+b}}+\frac {\cosh (x) \sinh (x)}{2 b} \]
-1/2*(2*a-b)*x/b^2+1/2*cosh(x)*sinh(x)/b+a^(3/2)*arctanh(a^(1/2)*tanh(x)/( a+b)^(1/2))/b^2/(a+b)^(1/2)
Time = 0.09 (sec) , antiderivative size = 52, normalized size of antiderivative = 0.88 \[ \int \frac {\cosh ^4(x)}{a+b \cosh ^2(x)} \, dx=\frac {2 (-2 a+b) x+\frac {4 a^{3/2} \text {arctanh}\left (\frac {\sqrt {a} \tanh (x)}{\sqrt {a+b}}\right )}{\sqrt {a+b}}+b \sinh (2 x)}{4 b^2} \]
(2*(-2*a + b)*x + (4*a^(3/2)*ArcTanh[(Sqrt[a]*Tanh[x])/Sqrt[a + b]])/Sqrt[ a + b] + b*Sinh[2*x])/(4*b^2)
Time = 0.30 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.29, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {3042, 3666, 372, 397, 219, 221}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\cosh ^4(x)}{a+b \cosh ^2(x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sin \left (\frac {\pi }{2}+i x\right )^4}{a+b \sin \left (\frac {\pi }{2}+i x\right )^2}dx\) |
\(\Big \downarrow \) 3666 |
\(\displaystyle \int \frac {\coth ^4(x)}{\left (1-\coth ^2(x)\right )^2 \left (a-(a+b) \coth ^2(x)\right )}d\coth (x)\) |
\(\Big \downarrow \) 372 |
\(\displaystyle \frac {\int \frac {(a-b) \coth ^2(x)+a}{\left (1-\coth ^2(x)\right ) \left (a-(a+b) \coth ^2(x)\right )}d\coth (x)}{2 b}-\frac {\coth (x)}{2 b \left (1-\coth ^2(x)\right )}\) |
\(\Big \downarrow \) 397 |
\(\displaystyle \frac {\frac {2 a^2 \int \frac {1}{a-(a+b) \coth ^2(x)}d\coth (x)}{b}-\frac {(2 a-b) \int \frac {1}{1-\coth ^2(x)}d\coth (x)}{b}}{2 b}-\frac {\coth (x)}{2 b \left (1-\coth ^2(x)\right )}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \frac {\frac {2 a^2 \int \frac {1}{a-(a+b) \coth ^2(x)}d\coth (x)}{b}-\frac {(2 a-b) \text {arctanh}(\coth (x))}{b}}{2 b}-\frac {\coth (x)}{2 b \left (1-\coth ^2(x)\right )}\) |
\(\Big \downarrow \) 221 |
\(\displaystyle \frac {\frac {2 a^{3/2} \text {arctanh}\left (\frac {\sqrt {a+b} \coth (x)}{\sqrt {a}}\right )}{b \sqrt {a+b}}-\frac {(2 a-b) \text {arctanh}(\coth (x))}{b}}{2 b}-\frac {\coth (x)}{2 b \left (1-\coth ^2(x)\right )}\) |
(-(((2*a - b)*ArcTanh[Coth[x]])/b) + (2*a^(3/2)*ArcTanh[(Sqrt[a + b]*Coth[ x])/Sqrt[a]])/(b*Sqrt[a + b]))/(2*b) - Coth[x]/(2*b*(1 - Coth[x]^2))
3.1.23.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt Q[a, 0] || LtQ[b, 0])
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x /Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_ ), x_Symbol] :> Simp[(-a)*e^3*(e*x)^(m - 3)*(a + b*x^2)^(p + 1)*((c + d*x^2 )^(q + 1)/(2*b*(b*c - a*d)*(p + 1))), x] + Simp[e^4/(2*b*(b*c - a*d)*(p + 1 )) Int[(e*x)^(m - 4)*(a + b*x^2)^(p + 1)*(c + d*x^2)^q*Simp[a*c*(m - 3) + (a*d*(m + 2*q - 1) + 2*b*c*(p + 1))*x^2, x], x], x] /; FreeQ[{a, b, c, d, e, q}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] && GtQ[m, 3] && IntBinomialQ[a , b, c, d, e, m, 2, p, q, x]
Int[((e_) + (f_.)*(x_)^2)/(((a_) + (b_.)*(x_)^2)*((c_) + (d_.)*(x_)^2)), x_ Symbol] :> Simp[(b*e - a*f)/(b*c - a*d) Int[1/(a + b*x^2), x], x] - Simp[ (d*e - c*f)/(b*c - a*d) Int[1/(c + d*x^2), x], x] /; FreeQ[{a, b, c, d, e , f}, x]
Int[sin[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^( p_.), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Simp[ff^(m + 1 )/f Subst[Int[x^m*((a + (a + b)*ff^2*x^2)^p/(1 + ff^2*x^2)^(m/2 + p + 1)) , x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[m/2] & & IntegerQ[p]
Leaf count of result is larger than twice the leaf count of optimal. \(119\) vs. \(2(47)=94\).
Time = 0.32 (sec) , antiderivative size = 120, normalized size of antiderivative = 2.03
method | result | size |
risch | \(-\frac {a x}{b^{2}}+\frac {x}{2 b}+\frac {{\mathrm e}^{2 x}}{8 b}-\frac {{\mathrm e}^{-2 x}}{8 b}+\frac {\sqrt {a \left (a +b \right )}\, a \ln \left ({\mathrm e}^{2 x}-\frac {2 \sqrt {a \left (a +b \right )}-2 a -b}{b}\right )}{2 \left (a +b \right ) b^{2}}-\frac {\sqrt {a \left (a +b \right )}\, a \ln \left ({\mathrm e}^{2 x}+\frac {2 \sqrt {a \left (a +b \right )}+2 a +b}{b}\right )}{2 \left (a +b \right ) b^{2}}\) | \(120\) |
default | \(-\frac {2 a^{2} \left (-\frac {\ln \left (\sqrt {a +b}\, \tanh \left (\frac {x}{2}\right )^{2}+2 \tanh \left (\frac {x}{2}\right ) \sqrt {a}+\sqrt {a +b}\right )}{4 \sqrt {a}\, \sqrt {a +b}}+\frac {\ln \left (-\sqrt {a +b}\, \tanh \left (\frac {x}{2}\right )^{2}+2 \tanh \left (\frac {x}{2}\right ) \sqrt {a}-\sqrt {a +b}\right )}{4 \sqrt {a}\, \sqrt {a +b}}\right )}{b^{2}}-\frac {1}{2 b \left (\tanh \left (\frac {x}{2}\right )+1\right )^{2}}+\frac {1}{2 b \left (\tanh \left (\frac {x}{2}\right )+1\right )}+\frac {\left (-2 a +b \right ) \ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{2 b^{2}}+\frac {1}{2 b \left (\tanh \left (\frac {x}{2}\right )-1\right )^{2}}+\frac {1}{2 b \left (\tanh \left (\frac {x}{2}\right )-1\right )}+\frac {\left (2 a -b \right ) \ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{2 b^{2}}\) | \(178\) |
-a*x/b^2+1/2*x/b+1/8/b*exp(2*x)-1/8/b*exp(-2*x)+1/2*(a*(a+b))^(1/2)/(a+b)* a/b^2*ln(exp(2*x)-(2*(a*(a+b))^(1/2)-2*a-b)/b)-1/2*(a*(a+b))^(1/2)/(a+b)*a /b^2*ln(exp(2*x)+(2*(a*(a+b))^(1/2)+2*a+b)/b)
Leaf count of result is larger than twice the leaf count of optimal. 188 vs. \(2 (47) = 94\).
Time = 0.28 (sec) , antiderivative size = 573, normalized size of antiderivative = 9.71 \[ \int \frac {\cosh ^4(x)}{a+b \cosh ^2(x)} \, dx=\left [\frac {b \cosh \left (x\right )^{4} + 4 \, b \cosh \left (x\right ) \sinh \left (x\right )^{3} + b \sinh \left (x\right )^{4} - 4 \, {\left (2 \, a - b\right )} x \cosh \left (x\right )^{2} + 2 \, {\left (3 \, b \cosh \left (x\right )^{2} - 2 \, {\left (2 \, a - b\right )} x\right )} \sinh \left (x\right )^{2} + 4 \, {\left (a \cosh \left (x\right )^{2} + 2 \, a \cosh \left (x\right ) \sinh \left (x\right ) + a \sinh \left (x\right )^{2}\right )} \sqrt {\frac {a}{a + b}} \log \left (\frac {b^{2} \cosh \left (x\right )^{4} + 4 \, b^{2} \cosh \left (x\right ) \sinh \left (x\right )^{3} + b^{2} \sinh \left (x\right )^{4} + 2 \, {\left (2 \, a b + b^{2}\right )} \cosh \left (x\right )^{2} + 2 \, {\left (3 \, b^{2} \cosh \left (x\right )^{2} + 2 \, a b + b^{2}\right )} \sinh \left (x\right )^{2} + 8 \, a^{2} + 8 \, a b + b^{2} + 4 \, {\left (b^{2} \cosh \left (x\right )^{3} + {\left (2 \, a b + b^{2}\right )} \cosh \left (x\right )\right )} \sinh \left (x\right ) - 4 \, {\left ({\left (a b + b^{2}\right )} \cosh \left (x\right )^{2} + 2 \, {\left (a b + b^{2}\right )} \cosh \left (x\right ) \sinh \left (x\right ) + {\left (a b + b^{2}\right )} \sinh \left (x\right )^{2} + 2 \, a^{2} + 3 \, a b + b^{2}\right )} \sqrt {\frac {a}{a + b}}}{b \cosh \left (x\right )^{4} + 4 \, b \cosh \left (x\right ) \sinh \left (x\right )^{3} + b \sinh \left (x\right )^{4} + 2 \, {\left (2 \, a + b\right )} \cosh \left (x\right )^{2} + 2 \, {\left (3 \, b \cosh \left (x\right )^{2} + 2 \, a + b\right )} \sinh \left (x\right )^{2} + 4 \, {\left (b \cosh \left (x\right )^{3} + {\left (2 \, a + b\right )} \cosh \left (x\right )\right )} \sinh \left (x\right ) + b}\right ) + 4 \, {\left (b \cosh \left (x\right )^{3} - 2 \, {\left (2 \, a - b\right )} x \cosh \left (x\right )\right )} \sinh \left (x\right ) - b}{8 \, {\left (b^{2} \cosh \left (x\right )^{2} + 2 \, b^{2} \cosh \left (x\right ) \sinh \left (x\right ) + b^{2} \sinh \left (x\right )^{2}\right )}}, \frac {b \cosh \left (x\right )^{4} + 4 \, b \cosh \left (x\right ) \sinh \left (x\right )^{3} + b \sinh \left (x\right )^{4} - 4 \, {\left (2 \, a - b\right )} x \cosh \left (x\right )^{2} + 2 \, {\left (3 \, b \cosh \left (x\right )^{2} - 2 \, {\left (2 \, a - b\right )} x\right )} \sinh \left (x\right )^{2} + 8 \, {\left (a \cosh \left (x\right )^{2} + 2 \, a \cosh \left (x\right ) \sinh \left (x\right ) + a \sinh \left (x\right )^{2}\right )} \sqrt {-\frac {a}{a + b}} \arctan \left (\frac {{\left (b \cosh \left (x\right )^{2} + 2 \, b \cosh \left (x\right ) \sinh \left (x\right ) + b \sinh \left (x\right )^{2} + 2 \, a + b\right )} \sqrt {-\frac {a}{a + b}}}{2 \, a}\right ) + 4 \, {\left (b \cosh \left (x\right )^{3} - 2 \, {\left (2 \, a - b\right )} x \cosh \left (x\right )\right )} \sinh \left (x\right ) - b}{8 \, {\left (b^{2} \cosh \left (x\right )^{2} + 2 \, b^{2} \cosh \left (x\right ) \sinh \left (x\right ) + b^{2} \sinh \left (x\right )^{2}\right )}}\right ] \]
[1/8*(b*cosh(x)^4 + 4*b*cosh(x)*sinh(x)^3 + b*sinh(x)^4 - 4*(2*a - b)*x*co sh(x)^2 + 2*(3*b*cosh(x)^2 - 2*(2*a - b)*x)*sinh(x)^2 + 4*(a*cosh(x)^2 + 2 *a*cosh(x)*sinh(x) + a*sinh(x)^2)*sqrt(a/(a + b))*log((b^2*cosh(x)^4 + 4*b ^2*cosh(x)*sinh(x)^3 + b^2*sinh(x)^4 + 2*(2*a*b + b^2)*cosh(x)^2 + 2*(3*b^ 2*cosh(x)^2 + 2*a*b + b^2)*sinh(x)^2 + 8*a^2 + 8*a*b + b^2 + 4*(b^2*cosh(x )^3 + (2*a*b + b^2)*cosh(x))*sinh(x) - 4*((a*b + b^2)*cosh(x)^2 + 2*(a*b + b^2)*cosh(x)*sinh(x) + (a*b + b^2)*sinh(x)^2 + 2*a^2 + 3*a*b + b^2)*sqrt( a/(a + b)))/(b*cosh(x)^4 + 4*b*cosh(x)*sinh(x)^3 + b*sinh(x)^4 + 2*(2*a + b)*cosh(x)^2 + 2*(3*b*cosh(x)^2 + 2*a + b)*sinh(x)^2 + 4*(b*cosh(x)^3 + (2 *a + b)*cosh(x))*sinh(x) + b)) + 4*(b*cosh(x)^3 - 2*(2*a - b)*x*cosh(x))*s inh(x) - b)/(b^2*cosh(x)^2 + 2*b^2*cosh(x)*sinh(x) + b^2*sinh(x)^2), 1/8*( b*cosh(x)^4 + 4*b*cosh(x)*sinh(x)^3 + b*sinh(x)^4 - 4*(2*a - b)*x*cosh(x)^ 2 + 2*(3*b*cosh(x)^2 - 2*(2*a - b)*x)*sinh(x)^2 + 8*(a*cosh(x)^2 + 2*a*cos h(x)*sinh(x) + a*sinh(x)^2)*sqrt(-a/(a + b))*arctan(1/2*(b*cosh(x)^2 + 2*b *cosh(x)*sinh(x) + b*sinh(x)^2 + 2*a + b)*sqrt(-a/(a + b))/a) + 4*(b*cosh( x)^3 - 2*(2*a - b)*x*cosh(x))*sinh(x) - b)/(b^2*cosh(x)^2 + 2*b^2*cosh(x)* sinh(x) + b^2*sinh(x)^2)]
Timed out. \[ \int \frac {\cosh ^4(x)}{a+b \cosh ^2(x)} \, dx=\text {Timed out} \]
Leaf count of result is larger than twice the leaf count of optimal. 347 vs. \(2 (47) = 94\).
Time = 0.29 (sec) , antiderivative size = 347, normalized size of antiderivative = 5.88 \[ \int \frac {\cosh ^4(x)}{a+b \cosh ^2(x)} \, dx=-\frac {{\left (2 \, a + b\right )} \log \left (\frac {b e^{\left (2 \, x\right )} + 2 \, a + b - 2 \, \sqrt {{\left (a + b\right )} a}}{b e^{\left (2 \, x\right )} + 2 \, a + b + 2 \, \sqrt {{\left (a + b\right )} a}}\right )}{4 \, \sqrt {{\left (a + b\right )} a} b} - \frac {3 \, \log \left (\frac {b e^{\left (-2 \, x\right )} + 2 \, a + b - 2 \, \sqrt {{\left (a + b\right )} a}}{b e^{\left (-2 \, x\right )} + 2 \, a + b + 2 \, \sqrt {{\left (a + b\right )} a}}\right )}{16 \, \sqrt {{\left (a + b\right )} a}} - \frac {{\left (2 \, a + b\right )} x}{b^{2}} + \frac {x}{b} + \frac {e^{\left (2 \, x\right )}}{8 \, b} - \frac {e^{\left (-2 \, x\right )}}{8 \, b} + \frac {{\left (2 \, a + b\right )} \log \left (b e^{\left (4 \, x\right )} + 2 \, {\left (2 \, a + b\right )} e^{\left (2 \, x\right )} + b\right )}{8 \, b^{2}} - \frac {{\left (2 \, a + b\right )} \log \left (2 \, {\left (2 \, a + b\right )} e^{\left (-2 \, x\right )} + b e^{\left (-4 \, x\right )} + b\right )}{8 \, b^{2}} + \frac {{\left (8 \, a^{2} + 8 \, a b + b^{2}\right )} \log \left (\frac {b e^{\left (2 \, x\right )} + 2 \, a + b - 2 \, \sqrt {{\left (a + b\right )} a}}{b e^{\left (2 \, x\right )} + 2 \, a + b + 2 \, \sqrt {{\left (a + b\right )} a}}\right )}{32 \, \sqrt {{\left (a + b\right )} a} b^{2}} - \frac {{\left (8 \, a^{2} + 8 \, a b + b^{2}\right )} \log \left (\frac {b e^{\left (-2 \, x\right )} + 2 \, a + b - 2 \, \sqrt {{\left (a + b\right )} a}}{b e^{\left (-2 \, x\right )} + 2 \, a + b + 2 \, \sqrt {{\left (a + b\right )} a}}\right )}{32 \, \sqrt {{\left (a + b\right )} a} b^{2}} \]
-1/4*(2*a + b)*log((b*e^(2*x) + 2*a + b - 2*sqrt((a + b)*a))/(b*e^(2*x) + 2*a + b + 2*sqrt((a + b)*a)))/(sqrt((a + b)*a)*b) - 3/16*log((b*e^(-2*x) + 2*a + b - 2*sqrt((a + b)*a))/(b*e^(-2*x) + 2*a + b + 2*sqrt((a + b)*a)))/ sqrt((a + b)*a) - (2*a + b)*x/b^2 + x/b + 1/8*e^(2*x)/b - 1/8*e^(-2*x)/b + 1/8*(2*a + b)*log(b*e^(4*x) + 2*(2*a + b)*e^(2*x) + b)/b^2 - 1/8*(2*a + b )*log(2*(2*a + b)*e^(-2*x) + b*e^(-4*x) + b)/b^2 + 1/32*(8*a^2 + 8*a*b + b ^2)*log((b*e^(2*x) + 2*a + b - 2*sqrt((a + b)*a))/(b*e^(2*x) + 2*a + b + 2 *sqrt((a + b)*a)))/(sqrt((a + b)*a)*b^2) - 1/32*(8*a^2 + 8*a*b + b^2)*log( (b*e^(-2*x) + 2*a + b - 2*sqrt((a + b)*a))/(b*e^(-2*x) + 2*a + b + 2*sqrt( (a + b)*a)))/(sqrt((a + b)*a)*b^2)
Leaf count of result is larger than twice the leaf count of optimal. 95 vs. \(2 (47) = 94\).
Time = 0.31 (sec) , antiderivative size = 95, normalized size of antiderivative = 1.61 \[ \int \frac {\cosh ^4(x)}{a+b \cosh ^2(x)} \, dx=\frac {a^{2} \arctan \left (\frac {b e^{\left (2 \, x\right )} + 2 \, a + b}{2 \, \sqrt {-a^{2} - a b}}\right )}{\sqrt {-a^{2} - a b} b^{2}} - \frac {{\left (2 \, a - b\right )} x}{2 \, b^{2}} + \frac {e^{\left (2 \, x\right )}}{8 \, b} + \frac {{\left (4 \, a e^{\left (2 \, x\right )} - 2 \, b e^{\left (2 \, x\right )} - b\right )} e^{\left (-2 \, x\right )}}{8 \, b^{2}} \]
a^2*arctan(1/2*(b*e^(2*x) + 2*a + b)/sqrt(-a^2 - a*b))/(sqrt(-a^2 - a*b)*b ^2) - 1/2*(2*a - b)*x/b^2 + 1/8*e^(2*x)/b + 1/8*(4*a*e^(2*x) - 2*b*e^(2*x) - b)*e^(-2*x)/b^2
Time = 2.07 (sec) , antiderivative size = 142, normalized size of antiderivative = 2.41 \[ \int \frac {\cosh ^4(x)}{a+b \cosh ^2(x)} \, dx=\frac {{\mathrm {e}}^{2\,x}}{8\,b}-\frac {{\mathrm {e}}^{-2\,x}}{8\,b}-\frac {x\,\left (2\,a-b\right )}{2\,b^2}+\frac {a^{3/2}\,\ln \left (-\frac {4\,a^2\,{\mathrm {e}}^{2\,x}}{b^3}-\frac {2\,a^{3/2}\,\left (b+2\,a\,{\mathrm {e}}^{2\,x}+b\,{\mathrm {e}}^{2\,x}\right )}{b^3\,\sqrt {a+b}}\right )}{2\,b^2\,\sqrt {a+b}}-\frac {a^{3/2}\,\ln \left (\frac {2\,a^{3/2}\,\left (b+2\,a\,{\mathrm {e}}^{2\,x}+b\,{\mathrm {e}}^{2\,x}\right )}{b^3\,\sqrt {a+b}}-\frac {4\,a^2\,{\mathrm {e}}^{2\,x}}{b^3}\right )}{2\,b^2\,\sqrt {a+b}} \]
exp(2*x)/(8*b) - exp(-2*x)/(8*b) - (x*(2*a - b))/(2*b^2) + (a^(3/2)*log(- (4*a^2*exp(2*x))/b^3 - (2*a^(3/2)*(b + 2*a*exp(2*x) + b*exp(2*x)))/(b^3*(a + b)^(1/2))))/(2*b^2*(a + b)^(1/2)) - (a^(3/2)*log((2*a^(3/2)*(b + 2*a*ex p(2*x) + b*exp(2*x)))/(b^3*(a + b)^(1/2)) - (4*a^2*exp(2*x))/b^3))/(2*b^2* (a + b)^(1/2))